package ModelLayer;
import java.util.ArrayList;


/**
 *      DVD
 *      Contains an instance of DVD(title,...)
 */
public class DVD
{
    // instance variables for DVD
    private String title;
    private String publisher;
    private String releaseYear;
    private ArrayList<Copy> c;

    /**
     * Constructor for objects of class DVD
     */
    public DVD(String title, String publisher, String releaseYear)
    {
        this.title = title;
        this.publisher = publisher;
        this.releaseYear = releaseYear;
        c = new ArrayList<Copy>();
    }

    public String getTitle()
    {
        return title;
    }
    public String getPublisher()
    {
        return publisher;
    }
    public String getReleaseYear()
    {
        return releaseYear;
    }
    public void createCopy(String serialNo, int purchaseDate, double purchasePrice)
    {
        //Get input for Copy and send it to dvdCtr
        Copy c = new Copy(serialNo, purchaseDate, purchasePrice);
        this.c.add(c);
    }
    public int getNoOfCopies()
    {
        //Get no of copies of current DVD
        int noOfCopies = c.size();
        return noOfCopies;
    }
}
